package wordroid.activitys;

import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.ListPreference;
import android.preference.Preference.OnPreferenceChangeListener;
import android.preference.PreferenceActivity;
import android.preference.PreferenceScreen;
import java.util.HashMap;
import wordroid.business.OperationOfBooks;
import wordroid.widget.timePreference;

public class Preference extends PreferenceActivity
  //implements Preference.OnPreferenceChangeListener
{
  ListPreference listpre;
  timePreference timepre;

  protected void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    addPreferencesFromResource(2130968576);
    this.timepre = ((timePreference)findPreference("time"));
   // this.timepre.setOnPreferenceChangeListener(this);
    SharedPreferences localSharedPreferences = getSharedPreferences("wordroid.model_preferences", 0);
    this.timepre.setSummary(localSharedPreferences.getString("time", "18:00 下午"));
    CharSequence[] arrayOfCharSequence1 = new CharSequence[2];
    arrayOfCharSequence1[0] = "英语";
    arrayOfCharSequence1[1] = "美语";
    this.listpre = ((ListPreference)findPreference("category"));
    this.listpre.setEntries(arrayOfCharSequence1);
    CharSequence[] arrayOfCharSequence2 = new CharSequence[2];
    arrayOfCharSequence2[0] = "1";
    arrayOfCharSequence2[1] = "2";
    this.listpre.setEntryValues(arrayOfCharSequence2);
    this.listpre.setSummary(this.listpre.getEntry());
    //getPreferenceScreen().getSharedPreferences().registerOnSharedPreferenceChangeListener(new 1(this));
  }

  public boolean onPreferenceChange(android.preference.Preference paramPreference, Object paramObject)
  {
    if (paramPreference.getKey().equals("time"))
    {
      HashMap localHashMap = (HashMap)paramObject;
      String str1 = "上午";
      if (((Integer)localHashMap.get("hour")).intValue() > 11)
        str1 = " 下午";
      int i = ((Integer)localHashMap.get("minute")).intValue();
      String str2 = String.valueOf(i);
      if (i < 10)
        str2 = "0" + i;
      this.timepre.setSummary(localHashMap.get("hour") + ":" + str2 + " " + str1);
      new OperationOfBooks().setNotify(getSharedPreferences("wordroid.model_preferences", 0).getString("time", "18:00 下午"), this);
    }
    return false;
  }
}

/* Location:           E:\Desktop\Android\英语词汇记忆\classes_dex2jar.jar
 * Qualified Name:     wordroid.activitys.Preference
 * JD-Core Version:    0.5.3
 */